package com.wrx.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wrx.server.pojo.RespBean;
import com.wrx.server.pojo.ThemePost;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wrx
 * @since 2021-04-20
 */
public interface IThemePostService extends IService<ThemePost> {

    /**
     * 发主题帖
     * @param bar_id
     * @param theme_post_title
     * @param theme_post_info
     * @param request
     * @return
     */
    public RespBean setThemePost(Integer bar_id, String theme_post_title, String theme_post_info, HttpServletRequest request);

    /**
     * 分页输出主题帖
     * @param bar_id
     * @param pageNum
     * @param pageSize
     * @param state
     * @return
     */
    public RespBean putPageTheme(int bar_id, int pageNum, int pageSize, int state);

    /**
     * 查询一条主题帖数据
     * @param theme_post_id
     * @return
     */
    public RespBean selOneThemePost(int theme_post_id);

    /**
     * 查询一条主题帖数据以及用户昵称
     * @param theme_post_id
     * @return
     */
    public RespBean selOneThemePostAndNetNameByThemePostId(int theme_post_id);


    /**
     * 查询一条主题帖数据、用户昵称以及是否被该用户收藏
     * @param theme_post_id
     * @param request
     * @return
     */
    RespBean selOneThemePostNetNameCollectorStateByThemePostId(int theme_post_id,HttpServletRequest request);

}


